import { request } from '../utils/request';

export async function fetchMemberList(params) {
  return request('userapi/user/getUserInfoList', {
    method: 'POST',
    body: params,
  });
}
export async function fetchCouponDetail(params) {
  return request('userapi/user/getCouponDetail', {
    method: 'POST',
    body: params,
  });
}

export async function fetchMemberDetail(params) {
  return request('userapi/user/getUserInfoDetail', {
    method: 'POST',
    body: params,
  });
}

export async function changeMemberStatus(params) {
  return request('userapi/user/batchUpdateUserSts', {
    method: 'POST',
    body: params,
  });
}

export async function fetchPayRecord(params) {
  return request('userapi/user/getUserOrdersList', {
    method: 'POST',
    body: params,
  });
}

export async function fetchPoint(params) {
  return request('userapi/user/getUserScoreInfo', {
    method: 'POST',
    body: params,
  });
}

export async function fetchCouponList(params) {
  return request('userapi/user/getCouponInfoList', {
    method: 'POST',
    body: params,
  });
}

export async function addCoupon(params) {
  return request('userapi/user/addCouponInfo', {
    method: 'POST',
    body: params,
  });
}

export async function editCoupon(params) {
  return request('userapi/user/updateCouponInfo', {
    method: 'POST',
    body: params,
  });
}

export async function deleteCoupon(params) {
  return request('userapi/user/delCoupon', {
    method: 'POST',
    body: params,
  });
}

export async function fetchGoodsList(params) {
  return request('userapi/user/getGoodsInfoListForCoupon', {
    method: 'POST',
    body: params,
  });
}

export async function addTag(params) {
  return request('userapi/user/setUserLabel', {
    method: 'POST',
    body: params,
  });
}

export async function paidMemebrShipList(params) {
  return request('userapi/user/asset/getAssetOrderList', {
    method: 'POST',
    body: params,
  });
}


export async function sumbitAssetOrders(params) {
  return request('userapi/user/asset/sumbitAssetOrders', {
    method: 'POST',
    body: params,
  });
}

export async function getPhoneUserList(params) {
  return request('userapi/user/getPhoneUserList', {
    method: 'POST',
    body: params,
  });
}


export async function getConfigureAssetInfo(params) {
  return request('userapi/user/asset/ignore/getConfigureAssetInfo', {
    method: 'POST',
    body: params,
  });
}
export async function configureAssetInfo(params) {
  return request('userapi/user/asset/ignore/configureAssetInfo', {
    method: 'POST',
    body: params,
  },'obj');
}

export async function getUserAssetConfigure(params) {
  return request('userapi/user/asset/getUserAssetConfigure', {
    method: 'POST',
    body: params,
  });
}
